*********************************************************************
DATA AND CODE to REPLICATE ENDOGENOUS BENCHMARKING
*********************************************************************

The *Makefile* in this folder lists all files and their 
dependencies. It will run all models, create plots and tables. 
Figures are created from their corresponding .R files (output: .pdf).
Tables are generated from .Rnw files (output: .tex). 

Executing the Makefile uses the GNU make utility available on all 
platforms, either natively (e.g., most Linux systems) or via add-ons, 
(e.g., the Xcode command line tools on MacOS, or WSL/WSL2 on Windows).
[https://www.gnu.org/software/make/manual/make.html]


For convenience, we also list below each file and its relationship to the 
content reported in the paper.



********** File naming conventions *********** 

{a}_exp{b}_{c}.*

where

{a} is one of (M, T, P) signifying Models, Tables, or Plots

{b} is one of (1, 2) signifying experiment I or II 

{c} describes the content (e.g., choice_pred)



**************** FILE LIST *******************

0) Input data files (see Codebook.pdf)

- HarmonizedData.dta

- FrenchExp2Data.dta



1) Tables 

- TABLE II: Binomial test of choice prop.
  M_exp1_choice_prop.R T_exp1_choice_prop.Rnw

- TABLE A3.1: Descr. stats 
  X_T_exp1_descr_stats.Rnw 
	
- TABLE A3.2:
  X_T_exp1_exog_benchm.Rnw
	
- TABLE A3.3
  X_T_exp1_benchm_names.Rnw

- TABLE A3.4
  X_T_exp1_treathet.Rnw 
	
- TABLE A4.2
  X_T_exp2_choice_prop.Rnw
	
- TABLE A4.3
  X_T_exp2_exog_benchm.Rnw 
	
- add. heterogeneity suggested by R2
  X_T_exp1_treathet_addtnl.Rnw 



2) Plots 

- FIGURE I: Pre-treat. political orientation and pos. benchmark sel.
  P_exp1_choice_pred.R 

- FIGURE II: Exogenous information and evaluation of gov. perf.
  P_exp1_exog_benchm.R 

- FIGURE IV: Pre-treatment pol. orientation and bench. sel.
  P_exp2_choice_pred.R 

- FIGURE V: 
  M_exp2_exog_benchm.do P_exp2_exog_benchm.R

- FIGURE A.3.1
  X_P_exp1_evals.R 

- FIGURE A.3.2
  X_P_exp1_choice_pred_spar.R 

- FIGURE A.3.3
  X_P_exp1_vote.R 

- FIGURE A.3.4
  X_P_exp3_Austria.R 

- FIGURE A4.1
  X_P_exp2_choice_pred_spar.R 

- FIGURE A.1
  X_P_exp1_satis_hist.R 





**************** REQUIREMENTS **************** 

For code using R, you will need the following packages:

readstata13
estimatr
ri2
doParallel
foreach
doRNG
car
sandwich
diagis
mgcv
mediation


Below we note the package versions used to create the results 
reported in the paper:

mediation_4.5.0    
mvtnorm_1.1-3      
Matrix_1.5-3       
MASS_7.3-58.3      
mgcv_1.8-42        
nlme_3.1-162       
diagis_0.2.2      
sandwich_3.0-2     
car_3.1-1          
carData_3.0-5      
doRNG_1.8.6        
rngtools_1.5.2     
doParallel_1.0.17  
iterators_1.0.14  
foreach_1.5.2      
ri2_0.4.0          
randomizr_0.24.0   
estimatr_1.0.0     
readstata13_0.10.1

